package com.bdqn.t350.ch04mybatisplus.controller;

import com.bdqn.t350.ch04mybatisplus.pojo.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

@Controller
@RequestMapping("/welcome")
public class Weclcome {

    //没有登录是不能访问改方法
    @RequestMapping("/index")
    public Object index(HttpSession session) {
        System.out.println("welcome index");
       // User user = (User) session.getAttribute("user");
       // if (user == null) {
       //     return "redirect:/error2";
       // } else {
            return "index";
       // }
    }
}
